var target = {
    name: 'protries'
}

var handler = {
    get: function(target,key) {
        console.log('-------');
        return target[key]
    },
    set: function (target,key,value) {
        console.log('///////');
        target[key] =value;
    }
}

// 浏览器
var targetWithLog = new Proxy (target,handler);
targetWithLog.name = '伟龙';
console.log(targetWithLog.name);